package com.noahplat.user.mapper;

import com.noahplat.user.pojo.Menu;
import com.noahplat.user.pojo.Role;
import com.noahplat.user.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 权限关系映射
 *
 * @author 李东
 * @version 1.0.0
 * @Date: 2021/2/27 9:02
 **/
public interface RoleMapper extends Mapper<Role> {
    @Select("select r.id,r.acctid,r.stid,r.role,r.description,r.created_by as createdBy,r.created_time as createdTime from" +
            " tb_user_role t, tb_role r where r.id = t.rid and t.uid = #{id}")
    List<Role> getRoleById(@Param("id") Long id);
}
